<cfparam name="sendEmail" type="boolean" default="false">

<cfquery name="GetScholarshipClaimsComplete" datasource="#datasourcename#">
	select *
	from scholarship_claims
	where criteriacompletedate is not null
	and criteriacompletedate > '8/7/08'
</cfquery>

<cfdump var="#GetScholarshipClaimsComplete#">

<cfif sendEmail>
	<cfoutput query="GetScholarshipClaimsComplete">
	
		<cfmail subject="Update on your Cash for College scholarship" to="#email#" from="cashforcollege@lachamber.com" type="html">
			<p>Dear #firstName# #lastName# (Claim ID #claimID#),</p>
			
			<p>This e-mail message is to confirm that we have received your class schedule as of #DateFormat(classscheduledate, 'mmmm d, yyyy')#, and to let you know your college choice, degree path, full or part time status, and schedule of classes have been reviewed and verified.</p>
			
			<p>In the next two to three weeks, while we are processing your scholarship payment, we recommend that you:</p>
			
			<p>Contact your campus financial aid or scholarship office to let staff know your Cash for College scholarship payment is currently being processed and will be mailed to the campus financial aid office. The check will be made payable to the institution, with your name on the check. A copy of that letter and a copy of the check will be sent to the address you provided to us when you claimed your scholarship award.</p>
			
			<p>Currently hundreds of scholarship claims are being processed, and we expect to continue mailing payments for scholarships during the next two to three weeks. It will also take a few days for your campus to receive the check and process the payment.</p>
			
			<p>You can use previous communications from our program as evidence that your scholarship has been awarded and is coming to your campus. Share the <a href="http://www.calgrants.org/?navid=158">FAQs</a> attached here with your campus.</p>
			
			<p>If you have any questions, please e-mail our scholarship office at <a href="mailto:cashforcollege@lachamber.com">cashforcollege@lachamber.com</a>.</p>
			
			<p>Sincerely,</p>
			
			<p>California Cash for College</p>
			</cfmail>
	
	</cfoutput>
</cfif>


<cfquery name="GetScholarshipClaimsIncompleteButClassSchedule" datasource="#datasourcename#">
	select *
	from scholarship_claims
	where criteriacompletedate is null
	and classscheduledate is not null
	and classscheduledate > '8/7/08'
</cfquery>

<cfdump var="#GetScholarshipClaimsIncompleteButClassSchedule#">

<cfif sendEmail>
	<cfoutput query="GetScholarshipClaimsIncompleteButClassSchedule">
	
		<cfmail subject="Your class schedule has been received!" to="#email#" from="cashforcollege@lachamber.com" type="html">
		<p>Dear #firstName# #lastName# (Claim ID #claimID#),</p>

		<p>This email message is to confirm that your class schedule has been received by our scholarship office. Your scholarship claim is now being reviewed to confirm all scholarship criteria have been met before it is forwarded for payment.  You will receive another e-confirmation when your scholarship is in process for payment.</p>
		
		<p>Sincerely,</p>
		
		<p>California Cash for College</p>
		</cfmail>
	
	</cfoutput>
</cfif>